package com.inno.system.enums;

import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @author sean
 */
@Getter
public enum TypeEnum  {
    /**
     * "1" 智能问答
     */
    QUESTION("1", "智能问答"),
    /**
     * "2" 模拟面试
     */
    MOCK_INTERVIEW("2", "模拟面试"),
    /**
     * 练题
     */
    PRACTICE("3", "练题"),
    /**
     * 会员
     */
    VERIFY("4", "会员")


    ;



    private final String code;
    private final String desc;

    TypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(String code) {
        for (TypeEnum typeEnum : TypeEnum.values()) {
            if (typeEnum.getCode().equals(code)) {
                return typeEnum.getDesc();
            }
        }
        return StringUtils.EMPTY;
    }




}
